-- GENERATED SPELL FOR [Captain Halyndor] --


function spell0_1160(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(3360,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1160', 605, 1)
end

function spell1_1160(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(10651,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1160', 627, 1)
end

function spell2_1160(pUnit, Event) --@Curse of the Eye,n/a--
pUnit:FullCastSpellOnTarget(10653,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1160', 519, 1)
end

function spell3_1160(pUnit, Event) --@Ward of the Eye,Self--
pUnit:FullCastSpellOnTarget(3389,pUnit)
pUnit:RegisterEvent('Sorts_1160', 6339, 1)
end

function Sorts_1160(pUnit, Event)
local choix_sorts_1160 = math.random(0, 3)
if choix_sorts_1160 == 0 then
pUnit:RegisterEvent('spell0_1160', 1, 1)
end
if choix_sorts_1160 == 1 then
pUnit:RegisterEvent('spell1_1160', 1, 1)
end
if choix_sorts_1160 == 2 then
pUnit:RegisterEvent('spell2_1160', 1, 1)
end
if choix_sorts_1160 == 3 then
pUnit:RegisterEvent('spell3_1160', 1, 1)
end
end

function mob1160_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1160', math.random(1500, 3000), 1)
end

function mob1160_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1160_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1160_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1160, 1, 'mob1160_Action')
RegisterUnitEvent(1160, 2, 'mob1160_Leave')
RegisterUnitEvent(1160, 3, 'mob1160_Kill')
RegisterUnitEvent(1160, 4, 'mob1160_Die')
